package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 外购对象 ecd_buy
 *
 * @author ruoyi
 * @date 2025-11-06
 */
public class EcdCategoryCost extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键，自增 */
    private Long id;

    /** 产品或项目ID */
    private Long pid;

    /** 类型标识 */
    @Excel(name = "类型标识")
    private Long ptype;

    /** 零件编号 */
    @Excel(name = "零件编号")
    private String partNumber;

    /** 零件名称 */
    @Excel(name = "零件名称")
    private String partName;

    /** 数量 */
    @Excel(name = "数量")
    private BigDecimal quantity;

    /** 单价 */
    @Excel(name = "单价")
    private BigDecimal price;

    /** 总金额（计算列） */
    @Excel(name = "总金额", readConverterExp = "计=算列")
    private BigDecimal totalPrice;

    /** 全局唯一标识 */
    private String uid;

    /** 更新日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updateDate;

    /** 创建日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createDate;

    /** 删除日期 */
    private Date deleteDate;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setPid(Long pid)
    {
        this.pid = pid;
    }

    public Long getPid()
    {
        return pid;
    }

    public void setPtype(Long ptype)
    {
        this.ptype = ptype;
    }

    public Long getPtype()
    {
        return ptype;
    }

    public void setPartNumber(String partNumber)
    {
        this.partNumber = partNumber;
    }

    public String getPartNumber()
    {
        return partNumber;
    }

    public void setPartName(String partName)
    {
        this.partName = partName;
    }

    public String getPartName()
    {
        return partName;
    }

    public void setQuantity(BigDecimal quantity)
    {
        this.quantity = quantity;
    }

    public BigDecimal getQuantity()
    {
        return quantity;
    }

    public void setPrice(BigDecimal price)
    {
        this.price = price;
    }

    public BigDecimal getPrice()
    {
        return price;
    }

    public void setTotalPrice(BigDecimal totalPrice)
    {
        this.totalPrice = totalPrice;
    }

    public BigDecimal getTotalPrice()
    {
        return totalPrice;
    }

    public void setUid(String uid)
    {
        this.uid = uid;
    }

    public String getUid()
    {
        return uid;
    }

    public void setUpdateDate(Date updateDate)
    {
        this.updateDate = updateDate;
    }

    public Date getUpdateDate()
    {
        return updateDate;
    }

    public void setCreateDate(Date createDate)
    {
        this.createDate = createDate;
    }

    public Date getCreateDate()
    {
        return createDate;
    }

    public void setDeleteDate(Date deleteDate)
    {
        this.deleteDate = deleteDate;
    }

    public Date getDeleteDate()
    {
        return deleteDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("pid", getPid())
            .append("ptype", getPtype())
            .append("partNumber", getPartNumber())
            .append("partName", getPartName())
            .append("quantity", getQuantity())
            .append("price", getPrice())
            .append("totalPrice", getTotalPrice())
            .append("uid", getUid())
            .append("updateDate", getUpdateDate())
            .append("createDate", getCreateDate())
            .append("deleteDate", getDeleteDate())
            .toString();
    }
}
